<template>
    <div>
        <div class="jump-box">
            <img src="@/assets/images/logo.png" alt="">
            <p><i class="el-icon-loading"></i> 跳转中...</p>
        </div>
    </div>
</template>

<script>
export default {
    name: '',
    data() {
        return {};
    },
    mounted() {
        this.goJump();
    },
    methods: {
        goJump() {
            let guid = this.getQuery('guid');

            if (!guid) {
                return;
            }
            this.$post(
                `${this.$store.state.api.webUrl}/userlogin/getSession.json`,
                {
                    guid: guid,
                },
                (data) => {
                    var targetUrl = this.getQuery('redirect');
                    
                    targetUrl = targetUrl || '/home';

                    this.$router.replace(targetUrl);
                }
            );
        },
    },
};
</script>

<style lang='scss' scoped>
.jump-box {
    width: 500px;
    margin: 0 auto;
    padding-top: 25vh;
    text-align: center;
    img {
        width: 300px;
    }
    p {
        font-size: 30px;
        text-align: center;
        color: #3b68ff;
    }
}
</style>
